<template>
  <div class="container">
    <div class="main">
      <el-form
        :model="formData"
        ref="formData"
        label-width="130px"
        class="demo-formData"
      >
        <table cellspacing="0" cellpadding="0">
          <tbody>
            <tr>
              <td class="title keyColor">施工方名称</td>
              <td>{{ formData.pbName || '--' }}</td>
              <td class="title keyColor">施工方社会信用代码</td>
              <td>{{ formData.pbUscc || '--' }}</td>
            </tr>
            <tr>
              <td class="title keyColor">项目名称</td>
              <td>{{ formData.projectName || '--' }}</td>
              <td class="title keyColor">项目状态</td>
              <td>{{ formData.prjStatus || '--' }}</td>
            </tr>
            <tr>
              <td class="title keyColor">项目分类</td>
              <td>{{ formData.typeName || '--' }}</td>
              <td class="title keyColor">项目地区</td>
              <td>{{ formData.areaName || '--' }}</td>
            </tr>
            <tr>
              <td class="title keyColor">施工许可证</td>
              <td>{{ formData.buildLicense || '--' }}</td>
              <td class="title">总投资，单位：（万元）</td>
              <td>{{ formData.invest || '--' }}</td>
            </tr>
            <tr>
              <td class="title">建设方名称</td>
              <td>{{ formData.pcName || '--' }}</td>
              <td class="title">建设方社会信用代码</td>
              <td>{{ formData.pcUscc || '--' }}</td>
            </tr>
            <tr>
              <td class="title">开工日期</td>
              <td>{{ formData.startDate || '--' }}</td>
              <td class="title">竣工日期</td>
              <td>{{ formData.completeDate || '--' }}</td>
            </tr>
            <tr>
              <td class="title">联系人办公电话</td>
              <td>{{ formData.linkPhone || '--' }}</td>
              <td class="title">联系人姓名</td>
              <td>{{ formData.linkMan || '--' }}</td>
            </tr>
            <tr>
              <td class="title">WGS84纬度</td>
              <td>{{ formData.lng || '--' }}</td>
              <td class="title">WGS84经度</td>
              <td>{{ formData.lat || '--' }}</td>
            </tr>
            <tr>
              <td class="title">项目地址</td>
              <td colspan="4">{{ formData.address || '--' }}</td>
            </tr>
          </tbody>
        </table>
      </el-form>
    </div>
  </div>
</template>

<script>
export default {
  name: 'zjProjectDetail',
  data() {
    return {
      formData: {
        projectId: '',
      },
    }
  },
  created() {
    this.projectId = this.$route.query.projectId
    this.getDetail()
  },
  methods: {
    getDetail() {
      this.axios({
        method: 'post',
        url: 'api-out/sz/project/detail',
        data: {
          projectId: this.projectId,
        },
      })
        .then((response) => {
          this.formData = response.data.result
        })
        .catch((error) => {
          this.$message.error('数据获取失败')
        })
    },
  },
}
</script>

<style scoped lang="less">
.container {
  .main {
    padding: 24px;
    height: calc(100% - 67px);
    color: #333;
    font-size: 14px;
  }
}
form.el-form.demo-formData {
  width: 100%;
  display: inline-block;
  text-align: left;
  padding-bottom: 24px;
  .a_link {
    color: #00a0e9;
  }
  table {
    width: 100%;
    border-top: 1px solid #d5dfe8;
    border-left: 1px solid #d5dfe8;
    td {
      padding: 16px 18px;
      border-bottom: 1px solid #d5dfe8;
      border-right: 1px solid #d5dfe8;
    }
    .title {
      width: 177px;
      background-color: #f5f7fc;
      font-weight: 500;
      text-align: right;
    }
    .general {
      color: #6dd400;
    }
    .import {
      color: #fa6400;
    }
    .serious {
      color: #e02020;
    }
  }
}
.el-main .el-form-item {
  margin-bottom: 20px;
}
/deep/ .el-drawer__body {
  overflow: auto !important;
}
.keyColor {
  color: #e02020;
}
</style>
